package com.kim.rssreader.activity;

import com.kim.rssreader.R;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class AboutActivity extends BaseActivity {
	private TextView txv_version;
	private ImageView about_back;

	String version = "1.2.0";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public void initView() {
		setContentView(R.layout.rss_setting_about);

		txv_version = (TextView) findViewById(R.id.about_txv_version);
		about_back = (ImageView) findViewById(R.id.rss_settings_about_back);
		about_back.setOnClickListener(new ImageView.OnClickListener() {
			@Override
			public void onClick(View v) {
				AboutActivity.this.finish();
			}
		});

		txv_version.setText(version);
	}

	@Override
	public void initParam() {
		try {
			PackageInfo info = this.getPackageManager().getPackageInfo(
					this.getPackageName(), 0);
			version = info.versionName;
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}
	}

}
